package se.webbzon.boltzmann.editor.component.sequence.panel;

import java.util.Collection;

import javax.swing.JPanel;

import se.webbzon.boltzmann.game.sequence.builder.AbstractSequenceRow;

public abstract class AbstractRowPanel extends JPanel {
	
	// Auto generated serial version UID
	private static final long serialVersionUID = -6904954322502481874L;
	
	// The sequence row associated with this panel
	private final AbstractSequenceRow row;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public AbstractRowPanel(AbstractSequenceRow row) {
		this.row = row;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the sequence row associated with this panel. **/
	public AbstractSequenceRow getSequenceRow() {
		return row;
	}
	
	/** Applies the modifications of the panel onto the sequence row. **/
	public abstract boolean apply(Collection<String> errorMessages);

}
